﻿Dipan.SanGuo.Plus.Fun=
{
    Initialize: function()
    {
        
    },
    store:function()
    {
        var Loader = new Dipan.SanGuo.Common.Loader();
        Loader.onsuccess = function()
        {
            Dipan.SanGuo.Plus.Store.store();
        }
		Loader.js(Dipan.SanGuo.Common.StaticsServer + "/Statics/JavaScripts/plus/store.js", true);
    },
    found:function(json)//寻访
    {
        var Loader = new Dipan.SanGuo.Common.Loader();
        Loader.onsuccess = function()
        {
            Dipan.SanGuo.Plus.Found.found(json);
        }
		Loader.js(Dipan.SanGuo.Common.StaticsServer + "/Statics/JavaScripts/plus/found.js", true);
   }, 
    plus:function(json)
    {
        var Loader = new Dipan.SanGuo.Common.Loader();
        if(json.id==3)//建筑排程
        {
            Loader.onsuccess = function()
            {
                Dipan.SanGuo.Plus.Build.build(json.lefttime);
            }
		    Loader.js(Dipan.SanGuo.Common.StaticsServer + "/Statics/JavaScripts/plus/build.js", true);
        }
        else if(json.id==1||json.id==2)//建筑升级缩短
        {
            Loader.onsuccess = function()
            {
                //Dipan.SanGuo.PageTo.add('Plus.Speedup.speedup('+json.gid+','+json.cityid+','+json.lefttime+','+json.up+')');
                Dipan.SanGuo.Plus.Speedup.speedup(json.pid,json.gid,json.cityid,json.lefttime,json.up);
            }
		    Loader.js(Dipan.SanGuo.Common.StaticsServer + "/Statics/JavaScripts/plus/speedup.js", true);
        }
        else if(json.id==24||json.id==29)//城池外观背景
        {
            Loader.onsuccess = function()
            {
                //Dipan.SanGuo.PageTo.add('Plus.Speedup.speedup('+json.gid+','+json.cityid+','+json.lefttime+','+json.up+')');
                Dipan.SanGuo.Plus.Face.face(json.id,json.lefttime,json.cityid);
            }
		    Loader.js(Dipan.SanGuo.Common.StaticsServer + "/Statics/JavaScripts/plus/face.js", true);
        }
        else if(json.id==41)//人物洗点
        {
             Loader.onsuccess = function()
            {
                //Dipan.SanGuo.PageTo.add('Plus.Points.points('+json.lGeneralID+','+json.GeneralName+')');
                Dipan.SanGuo.Plus.Points.points(json.lGeneralID,json.GeneralName,json.type);
            }
		    Loader.js(Dipan.SanGuo.Common.StaticsServer + "/Statics/JavaScripts/plus/skill_points.js", true);   
        }
        else if(json.id==42)//人物治疗
        {
             Loader.onsuccess = function()
            {
                //Dipan.SanGuo.PageTo.add('Plus.Health.health('+json.lGeneralID+','+json.GeneralName+')');
                Dipan.SanGuo.Plus.Health.health(json.lGeneralID,json.GeneralName);
            }
		    Loader.js(Dipan.SanGuo.Common.StaticsServer + "/Statics/JavaScripts/plus/health.js", true);
        }
        else if(json.id==73||json.id>=78&&json.id<=81)//出征计谋
        {
            Loader.onsuccess = function()
            {
                Dipan.SanGuo.Plus.Fight.fight(json.choseyn);
            }
		    Loader.js(Dipan.SanGuo.Common.StaticsServer + "/Statics/JavaScripts/plus/stratagem_fight.js", true);
        }
        else if(json.id>=4&&json.id<=7)//绿洲采集权

        {
            Loader.onsuccess = function()
            {
                Dipan.SanGuo.Plus.Oasis.oasis(json.nowlv,json.checklv,json.lefttime);
            }
		    Loader.js(Dipan.SanGuo.Common.StaticsServer + "/Statics/JavaScripts/plus/oasis.js", true);
        }
        else if(json.id==8)//连续运送

        {
            Loader.onsuccess = function()
            {
                Dipan.SanGuo.Plus.Transport.transport(json.lefttime);
            }
		    Loader.js(Dipan.SanGuo.Common.StaticsServer + "/Statics/JavaScripts/plus/transport.js", true);   
        }
        else if(json.id==22)//加族加成
        {
            Loader.onsuccess = function()
            {
                Dipan.SanGuo.Plus.Family.family();
            }
		    Loader.js(Dipan.SanGuo.Common.StaticsServer + "/Statics/JavaScripts/plus/family.js", true);
        }
        else if(json.id>=15&&json.id<=17)//人口加成
        {
            Loader.onsuccess = function()
            {
                Dipan.SanGuo.Plus.Population.population(json.nowlv,json.checklv,json.lefttime);
            }
		    Loader.js(Dipan.SanGuo.Common.StaticsServer + "/Statics/JavaScripts/plus/population.js", true);
        }
        else if(json.id>=9&&json.id<=11)//攻击加成
        {
            Loader.onsuccess = function()
            {
                Dipan.SanGuo.Plus.Att.att(json.nowlv,json.checklv,json.lefttime);
            }
		    Loader.js(Dipan.SanGuo.Common.StaticsServer + "/Statics/JavaScripts/plus/att.js", true);
        }
        else if(json.id>=12&&json.id<=14)//防御加成
        {
            Loader.onsuccess = function()
            {
                Dipan.SanGuo.Plus.Def.def(json.nowlv,json.checklv,json.lefttime);
            }
		    Loader.js(Dipan.SanGuo.Common.StaticsServer + "/Statics/JavaScripts/plus/def.js", true);
        }
        else if(json.id>=44&&json.id<=46)//经验加成
        {
            Loader.onsuccess = function()
            {
                Dipan.SanGuo.Plus.Exp.exp(json.nowlv,json.checklv,json.lefttime);
            }
		    Loader.js(Dipan.SanGuo.Common.StaticsServer + "/Statics/JavaScripts/plus/exp.js", true);
        }
        else if(json.id==71||json.id==72||json.id==52||json.id==54||json.id==56||json.id==58)//无中生有 孙膑减灶
        {
            Loader.onsuccess = function()
            {
                Dipan.SanGuo.Plus.Stratagem.stratagem(json.id,json.lefttime,json.cityId);
            }
		    Loader.js(Dipan.SanGuo.Common.StaticsServer + "/Statics/JavaScripts/plus/stratagem.js", true);
        }
        else if(json.id==23)//休假
        {
            Loader.onsuccess = function()
            {
                Dipan.SanGuo.Plus.Vacation.vacation(json.id,json.lefttime);
            }
		    Loader.js(Dipan.SanGuo.Common.StaticsServer + "/Statics/JavaScripts/plus/vacation.js", true);
        }
        else if(json.id==51)//地城池使用计谋

        {
            Loader.onsuccess = function()
            {
                Dipan.SanGuo.Plus.Stratagem2.stratagem2(json.cityId,json.cityName,json.par);
            }
		    Loader.js(Dipan.SanGuo.Common.StaticsServer + "/Statics/JavaScripts/plus/stratagem2.js", true);
        }
        else if(json.id==96)
        {
            Loader.onsuccess = function()
            {
                Dipan.SanGuo.Plus.Stratagem3.stratagem3(json.cityId,json.cityName,json.lBattleID,json.par);
            }
		    Loader.js(Dipan.SanGuo.Common.StaticsServer + "/Statics/JavaScripts/plus/stratagem3.js", true);
        }
        //else if()//反制中调用计谋\
        else if(json.id==62)//包打听
        {
            Loader.onsuccess = function()
            {
                Dipan.SanGuo.Plus.Famoushero.famoushero(json.pos);
            }
		    Loader.js(Dipan.SanGuo.Common.StaticsServer + "/Statics/JavaScripts/plus/famoushero.js", true);
        }
        else if(json.id==61)//聚贤榜
        {
            Loader.onsuccess = function()
            {
                Dipan.SanGuo.Plus.Herolist.herolist(json.pos);
            }
		    Loader.js(Dipan.SanGuo.Common.StaticsServer + "/Statics/JavaScripts/plus/herolist.js", true);
        }
        else if(json.id==60)//包打听
        {
            Loader.onsuccess = function()
            {
                Dipan.SanGuo.Plus.Weaponmaking.weaponmaking(json.pid,json.wz,json.lefttime);
            }
		    Loader.js(Dipan.SanGuo.Common.StaticsServer + "/Statics/JavaScripts/plus/weaponmaking.js", true);
        }
        else if(json.id==63)
        {
            Loader.onsuccess = function()
            {
                Dipan.SanGuo.Plus.QiMan.qiman(json.nid,json.tid);
            }
		    Loader.js(Dipan.SanGuo.Common.StaticsServer + "/Statics/JavaScripts/plus/7man.js", true);
        }
    }
};
